package com.seven.controller;

import com.seven.dao.EmployeeDao;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;

/**
 * 员工表
 * @Author seven
 * @Date 2020/4/27 14:37
 **/
@Controller
public class EmployeeController {
    @Resource
    private EmployeeDao employeeDao;

    @GetMapping("/emps")
    public String list(Model model){
        model.addAttribute("emps",employeeDao.getAll());
        return "emp/list";
    }
}
